import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import Vant from 'vant';
import 'vant/lib/index.css';
import axios from 'axios'
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';


Vue.use(ElementUI);
Vue.use(Vant);
Vue.prototype.$http=axios
Vue.config.productionTip = false


//设置全局的时间过滤器
Vue.filter("time",(val)=>{
  var obj=new Date(val)
  var Y =obj.getFullYear()
  var M =(obj.getMonth()+1).toString().padStart(2,'0')
  var D =obj.getDate()
  var H=obj.getHours()
  var m=obj.getMinutes().toString().padStart(2,'0')
  var s=obj.getSeconds().toString().padStart(2,'0')
  return `${Y}-${M}-${D} ${H}:${m}:${s}`
})

var str="123"

console.log(str.padStart(5,"0"));

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
